/**
 * Created by hubin on 2016/6/14.
 */

var home_vm = avalon.define({
    $id: "home",
    url: "manager/managemoney.jsp",
    pageController: function (flag) {
        if (flag == "product" || flag == "1") {
            home_vm.url = "manager/managemoney.jsp";
        }
        if (flag == "home" || flag == "2") {
            home_vm.url = "manager/main.jsp";
        }
        if (flag == 'topic' || flag == "4") {
            home_vm.url = "manager/topic.jsp";
        }
        if (flag == 'count' || flag == "3") {
            home_vm.url = "manager/count.jsp";
        }
        $.ajax({
            type: 'GET',
            url: '/CounterDrops/index/manager/managerdirector',
            data: {
                URL:home_vm.url
            },
            success: function (data) {
                window.location.reload();

            },
            error: function (e) {
                swal("请求异常", "You clicked the button!", "warning")
            }
        })
    }

});
